function [outfold,outname] = cr_outfold( rpath , lstr , rstr ); 
% ==============================================================
% CR_OUTFOLD 
%
% function [outfold,outname] = cr_outfold( rpath , lstr , rstr ); 
%
% Create OUTFOLD, output folder 
% In directory RPATH 
% Name: LSTR + on screen option + RSTR
% Where if RSTR == [] , date will be used 
%
% OUTFOLD   New Folder path 
% OUTNAME   New Folder name 
%
% Copyright (C) Alejandro Justiniano 11/24/2005 
% ===============================================================
if nargin == 2 | isempty( rstr ); 
    rstr = strdate; 
end 

prompt = {'Enter Middle String for OUTFOLD, output folder'}; 
name   = ['Between ',lstr,' and ',rstr]; 
numlines = 1; 
defaultanswer = {''}; 
answer=inputdlg(prompt,name,numlines,defaultanswer);
answer=char( answer ); 
if isempty( answer ) 
    outname=[lstr,' ',rstr];
else 
    outname=[lstr,' ',answer,' ',rstr];
end 
disp(['Output folder will be: ',outname ]);

outfold = cr_dir( rpath , outname);


